<?php

 /**
  * @package JooS
  * @subpackage Syntax
  */

  require_once "JooS/Syntax/Simple.php";

 /**
  * Digit ::= ? [0-9] ?;
  **/
  class JooS_Syntax_Simple_Digit extends JooS_Syntax_Simple {
    /**
     * @return bool
     */
    protected function checkChars() {
      if (parent::checkChars()) {
        $ord = ord($this->getChars());
        if ($ord >= 48 && $ord <= 57)
          return true;
      }
      return false;
    }
  }
